package com.bwie.protocol;


import sun.nio.cs.ext.GBK;

import java.nio.charset.Charset;
import java.nio.charset.StandardCharsets;

/**
 * 自定义协议实体类
 */
public class CustomProtocol {
    // 消息内容
    private byte[] content;

    public CustomProtocol(byte[] content) {
        this.content = content;
    }

    public CustomProtocol(String content) {
        this.content = content.getBytes(StandardCharsets.UTF_8);
    }

    public byte[] getContent() {
        return content;
    }

    public void setContent(byte[] content) {
        this.content = content;
    }
}

